package com.learn.jvm.controller;

import com.learn.jvm.domain.Person;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
public class HeapController {



    @GetMapping("/heap")
    public String heap() throws InterruptedException {
        List<Person> list = new ArrayList<>();
        while (true) {
            list.add(new Person());
            Thread.sleep(100);
        }
    }
}
